﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DelonixRegiaHMSys.Core.Interfaces;
using DelonixRegiaHMSys.Core.Models;

namespace DelonixRegiaHMSys.Infrastructure.Data
{
    public class EfGuestReportQuery : IGuestReportQuery 
    {
        public IEnumerable<GuestReport> GetAllGuestReport()
        {
            var context = new hmsDBEntities();
            return context.guestDetails.Select(gr => new GuestReport()
            {
                guestID = gr.guestID,
                guestFirstName = gr.guestFirstName,
                guestLastName = gr.guestLastName,
                homeAddress = gr.homeAddress,
                nationality = gr.nationality,
                contactNum = gr.contactNum,
                emailAddress = gr.emailAddress,
                mailAddress = gr.mailAddress
            });
        }
    }
}
